package com.unf.edu.rms.controller.users;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

@Controller
public class RMSBaseController {
	
	@Autowired
	HttpServletRequest request;
	
	/*public void initBinder(HttpServletRequest request, ServletRequestDataBinder binder) {
		HttpSession session = request.getSession();
		System.out.println("RMSBaseController.initBinder()==========loggedInUser status========="+session.getAttribute("loggedInUser"));
		if((Boolean)session.getAttribute("loggedInUser")==false)
		{
			this.clearSession();
			
		}	
		
	}*/
	/*private String clearSession()
	{
		HttpSession session = request.getSession();
		session.setAttribute("loggedInUser", false);
		request.getSession().setAttribute("roleId",0);
		return RMSConstants.DASHBOARD_VIEW;
	}
	@Override
	public void afterPropertiesSet() throws Exception {
		HttpSession session = request.getSession();
		System.out.println("RMSBaseController.afterPropertiesSet()==========loggedInUser status========="+session.getAttribute("loggedInUser"));
		if((Boolean)session.getAttribute("loggedInUser")==false)
		{
			this.clearSession();
			
		}	
		
	}*/
	
}
